//
//  JSDetailViewController.swift
//  JS weibo
//
//  Created by Jackie on 16/5/28.
//  Copyright © 2016年 Jackie. All rights reserved.
//

import UIKit

class JSDetailViewController:UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.title = "\(navigationController?.childViewControllers.count ?? 0)"
        view.backgroundColor = UIColor.whiteColor()
        
//        let back = UIBarButtonItem(imageName: "navigationbar_back_withtext", title:"返回",target: self, action: #selector(JSDetailViewController.back))
//        self.navigationItem.leftBarButtonItem = back
        
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Next", style: .Plain, target: self, action: #selector(next))
    }
    
    @objc private func next() {
        let next = JSDetailViewController()
        navigationController?.pushViewController(next, animated: true)
    }
    
//    @objc private func back () {
//        navigationController?.popViewControllerAnimated(true)
//    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }

    
}
